package edu.zjut.hjg.saas.biz.service;

import java.util.List;

import edu.zjut.hjg.saas.biz.meta.KindergartenMeta;
import edu.zjut.hjg.saas.biz.model.Kindergarten;
import edu.zjut.hjg.saas.biz.service.exception.ServiceException;
import edu.zjut.hjg.saas.biz.support.AppStatus;
import edu.zjut.hjg.saas.biz.support.Paginated;

/**
 * 幼儿园操作相关接口
 * 
 * @author hjg
 */
public interface KindergartenService {
    Integer create(Kindergarten kindergarten) throws ServiceException;

    boolean siteDomainExist(String siteDomain);

    Kindergarten findBySiteDomain(String siteDomain);

    Kindergarten findByTenantId(Integer tenantId);

    Paginated<Kindergarten> listByStatus(AppStatus status, int pageSize, int page);

    void updateStatus(Integer id, AppStatus status) throws ServiceException;

    void update(Kindergarten kindergarten) throws ServiceException;

    void updateConfig(KindergartenMeta meta);

    Paginated<Kindergarten> searchByCityCode(String cityCode, int pageSize, int page);

    Paginated<Kindergarten> searchByName(String name, int pageSize, int page);

    Paginated<Kindergarten> searchByProvinceCode(String provinceCode, int pageSize, int page);

    List<String> getThemes();

    void disable(Kindergarten kindergarten);

    void enable(Kindergarten kindergarten, int priceTypeId, int leaseTerm) throws ServiceException;
}
